package grape.house.rest.buildingroom.mvc;

import grape.common.rest.advice.DisableGRB;
import grape.common.rest.advice.DisableGRM;
import grape.common.rest.mvc.SuperController;
import grape.house.service.buildingroom.api.IBuildingRoomService;
import grape.house.service.buildingroom.po.BuildingRoom;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * <p>
 * 房屋内部调用接口
 * </p>
 *
 * @author yangwei
 * @since 2019-9-28
 */
@RestController
@RequestMapping("/house/buildingroom")
@ApiIgnore
public class BuildingRoomInnerController extends SuperController {
    @Autowired
    private IBuildingRoomService iBuildingRoomService;

    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/trans/support")
    public boolean support(String type){
        return iBuildingRoomService.support(type);
    }
    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/trans")
    public String trans(String type,String key){
        return iBuildingRoomService.trans(type,key);
    }


    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/getBuildingRoomById")
    public BuildingRoom getBuildingRoomById(String id){
        return iBuildingRoomService.getById(id);
    }

    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/getBuildingRoomByCode")
    public BuildingRoom getBuildingRoomByCode(String code){
        return iBuildingRoomService.getByCode(code);
    }

}
